package tk.chenyilin.client;

import java.util.Scanner;


/**
 * 最开始实现的命令行客户端
 * 图形界面客户端是基于命令行客户端的
 * 遗留下来了一些命令行的内容
 * @author 陈奕霖
 *
 */
public class Client {
	static Scanner scanner=new Scanner(System.in);
	
	String username,hostName;
	int port;
	
	Client(String username, String hostName, String port){
		this.username=username;
		this.hostName=hostName;
		this.port=Integer.parseInt(port);
	}
	
	public static void main(String[] args) throws Exception {
		System.out.print("Username:");
		String username=scanner.next();
		System.out.print("Host Name:");
		String hostName=scanner.next();
		System.out.print("Port:");
		String port=scanner.next();
		Client client=new Client(username,hostName,port);
		Connection connection=new Connection(client);
		connection.start();
	}
	
	public void print(String message){
		System.out.println(message);
	}
}
